switchport trunk allowed vlan
This command is used to configure the VLANs available on the trunk (when the interface is in trunking mode).
Syntax
switchport trunk allowed vlan add <vlan id> switchport trunk allowed vlan remove <vlan id>
Command |
Description |
---|---|
add |
Adds an entry to the list of allowed VLANs. |
remove |
Removes an entry from the list of allowed VLANs. |
<vlan id> |
Specifies a valid VLAN interface ID. Range is 1 to 3999. |
Default
NA
Note
VLAN ID values range from 1 to 3999.
Command Mode
Privileged User
Related Commands
switchport mode
Example
This example adds VLAN 3 to the VLAN trunk defined for GigabitEthernet 4/2:
(conf-if-GE 4/2)# switchport trunk allowed vlan add 3